<script setup lang="ts">
// import HelloWorld from './components/HelloWorld.vue';
// import UseAxios from '@/components/UseAxios.vue';
</script>

<template>
  <router-view v-slot="{ Component }">
    <Transition name="fade" mode="out-in">
      <component :is="Component" />
    </Transition>
  </router-view>
  <!-- 
    router-view 将显示与 url 对应的组件，可以把它放在任何地方以适应布局
    Transition 是基于路由的动态过渡动效 
  -->
  <!-- <HelloWorld msg="Vite + Vue" /> -->
  <!-- <UseAxios /> -->
</template>

<style>
.fade-enter-active,
.fade-leave-active {
  transition: all 0.2s ease;
}

.fade-enter-from,
.fade-leave-active {
  opacity: 0;
}
</style>
